package com.tcm.user.dao;

import com.tcm.user.model.entity.LoginAuth;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface SocialLoginMapper {
    int deleteByUserId(@Param("userId") Long userId, @Param("clientType") String clientType,
                       @Param("identityType") String identityType);

    int insert(LoginAuth record);

    LoginAuth findByUserId(Long userId, @Param("clientType") String clientType,
                           @Param("identityType") String identityType);

    String findTokenByUserId(@Param("userId") Long userId, @Param("clientType") String clientType,
                              @Param("identityType") String identityType);

    LoginAuth findByIdentifier(@Param("identifier") String identifier,
                               @Param("identityType") String identityType,
                               @Param("clientType") String clientType);

    int update(LoginAuth record);

    List<LoginAuth> listScialLoginPage(Map<String, Object> maps);

    int countScialLogin(Map<String, Object> maps);

}